Skip to content

fix(audit): redact payloads in store insert as last defence - #361

Merged
davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:fix/audit-store-redaction
Sep 4, 2026
Merged

davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:fix/audit-store-redaction

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

Redaction lived only in recordAuditEvent. createAuditStore.insert wrote the event verbatim, so any direct insert() caller stored secrets in cleartext. All current callers use the wrapper, but the exported store invites direct use.

Fix applies redactAuditPayload inside insert too (idempotent, so the wrapper path is unchanged).

Tests: added direct-insert redaction case to server/tests/audit.test.ts (7 pass). Biome clean.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed diff against current main; resolved CHANGELOG keep-both; validated locally (format + composed test run). CI green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants